package com.zhiqian.community.dao;

import com.zhiqian.community.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    User getUserById(Integer id);

    User getUserByName(String username);

    User getUserByEmail(String email);

    int addUser(User user);

    int updateStatus(@Param("id") Integer id,@Param("status") Integer status);

    int updateHeader(@Param("id") Integer id,@Param("headerUrl") String headerUrl);

    int updatePassword(@Param("id") Integer id,@Param("password") String password);

    List<User> getAdminUsers();

    int updateType(@Param("id")Integer id,@Param("type")Integer type);

}
